package com.qunduikj.sjb.sdk.model.enums;

/**
 * 运费收回类型
 *  1 未收取 2已收取
 * Created by wangj on 2015/11/13 0013.
 */
public enum ReceivedType {
    UNRECEIVED(1,"有待收款"),RECEIVED(2,"运费已收");

    int type;
    String name;
    ReceivedType(int type, String name) {
        this.type = type;
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static String getStateNameByType(int type) {
        ReceivedType types[] = ReceivedType.values();
        for (int i = 0; i < types.length; i++) {
            ReceivedType rt = types[i];
            if (rt.getType() == type) {
                return rt.getName();
            }
        }
        return "";
    }
}
